home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / Interfaces&Libraries / Universal / Interfaces / AIncludes / Drag.a < prev    next >
Encoding:
Text File  |  1998-08-17  |  24.8 KB  |  844 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        Drag.a
  3. ;
  4. ;    Contains:    Drag and Drop Interfaces.
  5. ;
  6. ;    Version:    Technology:    System 7.5
  7. ;                Release:    Universal Interfaces 3.2
  8. ;
  9. ;    Copyright:    © 1992-1998 by Apple Computer, Inc., all rights reserved.
  10. ;
  11. ;    Bugs?:        For bug reports, consult the following page on
  12. ;                the World Wide Web:
  13. ;
  14. ;                    http://developer.apple.com/bugreporter/
  15. ;
  16. ;
  17.     IF &TYPE('__DRAG__') = 'UNDEFINED' THEN
  18. __DRAG__ SET 1
  19.  
  20.     IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
  21.     include 'MacTypes.a'
  22.     ENDIF
  23.     IF &TYPE('__EVENTS__') = 'UNDEFINED' THEN
  24.     include 'Events.a'
  25.     ENDIF
  26.     IF &TYPE('__FILES__') = 'UNDEFINED' THEN
  27.     include 'Files.a'
  28.     ENDIF
  29.     IF &TYPE('__APPLEEVENTS__') = 'UNDEFINED' THEN
  30.     include 'AppleEvents.a'
  31.     ENDIF
  32.     IF &TYPE('__QUICKDRAW__') = 'UNDEFINED' THEN
  33.     include 'Quickdraw.a'
  34.     ENDIF
  35.  
  36.  
  37. ;  _________________________________________________________________________________________________________
  38. ;      
  39. ;   • DRAG MANAGER DATA TYPES
  40. ;  _________________________________________________________________________________________________________
  41.  
  42.  
  43.  
  44.  
  45.  
  46. ; typedef UInt32                         ItemReference
  47.  
  48. ; typedef OSType                         FlavorType
  49.  
  50.  
  51. ;  _________________________________________________________________________________________________________
  52. ;      
  53. ;   • DRAG ATTRIBUTES
  54. ;  _________________________________________________________________________________________________________
  55.  
  56.  
  57.  
  58. ; typedef OptionBits                     DragAttributes
  59.  
  60.  
  61. kDragHasLeftSenderWindow        EQU        $00000001            ; drag has left the source window since TrackDrag
  62. kDragInsideSenderApplication    EQU        $00000002            ; drag is occurring within the sender application
  63. kDragInsideSenderWindow            EQU        $00000004            ; drag is occurring within the sender window
  64.  
  65. ;  _________________________________________________________________________________________________________
  66. ;      
  67. ;   • DRAG IMAGE FLAGS
  68. ;  _________________________________________________________________________________________________________
  69.  
  70.  
  71.  
  72. ; typedef OptionBits                     DragImageFlags
  73.  
  74.  
  75. kDragRegionAndImage                EQU        $00000010            ; drag region and image
  76.  
  77. ;  _________________________________________________________________________________________________________
  78. ;      
  79. ;   • DRAG IMAGE TRANSLUCENCY LEVELS
  80. ;  _________________________________________________________________________________________________________
  81.  
  82.  
  83.  
  84.  
  85. kDragStandardTranslucency        EQU        0                    ; 65% image translucency (standard)
  86. kDragDarkTranslucency            EQU        1                    ; 50% image translucency
  87. kDragDarkerTranslucency            EQU        2                    ; 25% image translucency
  88. kDragOpaqueTranslucency            EQU        3                    ; 0% image translucency (opaque)
  89.  
  90. ;  _________________________________________________________________________________________________________
  91. ;      
  92. ;   • DRAG DRAWING PROCEDURE MESSAGES
  93. ;  _________________________________________________________________________________________________________
  94.  
  95.  
  96.  
  97. ; typedef SInt16                         DragRegionMessage
  98.  
  99.  
  100. kDragRegionBegin                EQU        1                    ; initialize drawing
  101. kDragRegionDraw                    EQU        2                    ; draw drag feedback
  102. kDragRegionHide                    EQU        3                    ; hide drag feedback
  103. kDragRegionIdle                    EQU        4                    ; drag feedback idle time
  104. kDragRegionEnd                    EQU        5                    ; end of drawing
  105.  
  106. ;  _________________________________________________________________________________________________________
  107. ;      
  108. ;   • ZOOM ACCELERATION
  109. ;  _________________________________________________________________________________________________________
  110.  
  111.  
  112.  
  113. ; typedef SInt16                         ZoomAcceleration
  114.  
  115.  
  116. kZoomNoAcceleration                EQU        0                    ; use linear interpolation
  117. kZoomAccelerate                    EQU        1                    ; ramp up step size
  118. kZoomDecelerate                    EQU        2                    ; ramp down step size
  119.  
  120. ;  _________________________________________________________________________________________________________
  121. ;      
  122. ;   • FLAVOR FLAGS
  123. ;  _________________________________________________________________________________________________________
  124.  
  125.  
  126.  
  127. ; typedef OptionBits                     FlavorFlags
  128.  
  129.  
  130. flavorSenderOnly                EQU        $01                    ; flavor is available to sender only
  131. flavorSenderTranslated            EQU        $02                    ; flavor is translated by sender
  132. flavorNotSaved                    EQU        $04                    ; flavor should not be saved
  133. flavorSystemTranslated            EQU        $0100                ; flavor is translated by system
  134.  
  135. ;  _________________________________________________________________________________________________________
  136. ;      
  137. ;   • SPECIAL FLAVORS
  138. ;  _________________________________________________________________________________________________________
  139.  
  140.  
  141.  
  142.  
  143. flavorTypeHFS                    EQU        'hfs '                ; flavor type for HFS data
  144. flavorTypePromiseHFS            EQU        'phfs'                ; flavor type for promised HFS data
  145. flavorTypeDirectory                EQU        'diry'                ; flavor type for AOCE directories
  146.  
  147. ;  _________________________________________________________________________________________________________
  148. ;      
  149. ;   • FLAVORS FOR FINDER 8.0 AND LATER
  150. ;  _________________________________________________________________________________________________________
  151.  
  152.  
  153.  
  154.  
  155. kFlavorTypeClippingName            EQU        'clnm'                ; name hint for clipping file (preferred over 'clfn')
  156. kFlavorTypeClippingFilename        EQU        'clfn'                ; name for clipping file
  157. kFlavorTypeDragToTrashOnly        EQU        'fdtt'                ; for apps that want to allow dragging private data to the trash
  158. kFlavorTypeFinderNoTrackingBehavior EQU    'fntb'                ; Finder completely ignores any drag containing this flavor
  159.  
  160. ;  _________________________________________________________________________________________________________
  161. ;      
  162. ;   • DRAG TRACKING HANDLER MESSAGES
  163. ;  _________________________________________________________________________________________________________
  164.  
  165.  
  166.  
  167. ; typedef SInt16                         DragTrackingMessage
  168.  
  169.  
  170. kDragTrackingEnterHandler        EQU        1                    ; drag has entered handler
  171. kDragTrackingEnterWindow        EQU        2                    ; drag has entered window
  172. kDragTrackingInWindow            EQU        3                    ; drag is moving within window
  173. kDragTrackingLeaveWindow        EQU        4                    ; drag has exited window
  174. kDragTrackingLeaveHandler        EQU        5                    ; drag has exited handler
  175.  
  176. ;  _________________________________________________________________________________________________________
  177. ;      
  178. ;   • HFS FLAVORS
  179. ;  _________________________________________________________________________________________________________
  180.  
  181.  
  182.  
  183. HFSFlavor                RECORD 0
  184. fileType                 ds.l    1                ; offset: $0 (0)        ;  file type 
  185. fileCreator                 ds.l    1                ; offset: $4 (4)        ;  file creator 
  186. fdFlags                     ds.w    1                ; offset: $8 (8)        ;  Finder flags 
  187. fileSpec                 ds        FSSpec            ; offset: $A (10)        ;  file system specification 
  188. sizeof                     EQU *                    ; size:   $50 (80)
  189.                         ENDR
  190. PromiseHFSFlavor        RECORD 0
  191. fileType                 ds.l    1                ; offset: $0 (0)        ;  file type 
  192. fileCreator                 ds.l    1                ; offset: $4 (4)        ;  file creator 
  193. fdFlags                     ds.w    1                ; offset: $8 (8)        ;  Finder flags 
  194. promisedFlavor             ds.l    1                ; offset: $A (10)        ;  promised flavor containing an FSSpec 
  195. sizeof                     EQU *                    ; size:   $E (14)
  196.                         ENDR
  197.  
  198. ;  _________________________________________________________________________________________________________
  199. ;      
  200. ;   • APPLICATION-DEFINED DRAG HANDLER ROUTINES
  201. ;  _________________________________________________________________________________________________________
  202.  
  203.  
  204.  
  205. ;  _________________________________________________________________________________________________________
  206. ;      
  207. ;   • APPLICATION-DEFINED ROUTINES
  208. ;  _________________________________________________________________________________________________________
  209.  
  210.  
  211.  
  212. ;  _________________________________________________________________________________________________________
  213. ;      
  214. ;   • INSTALLING AND REMOVING HANDLERS API'S
  215. ;  _________________________________________________________________________________________________________
  216.  
  217.  
  218.  
  219. ;
  220. ; pascal OSErr InstallTrackingHandler(DragTrackingHandlerUPP trackingHandler, WindowPtr theWindow, void *handlerRefCon)
  221. ;
  222.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  223.         Macro
  224.         _InstallTrackingHandler
  225.             moveq               #1,D0
  226.             dc.w                $ABED
  227.         EndM
  228.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  229.         IMPORT_CFM_FUNCTION InstallTrackingHandler
  230.     ENDIF
  231.  
  232. ;
  233. ; pascal OSErr InstallReceiveHandler(DragReceiveHandlerUPP receiveHandler, WindowPtr theWindow, void *handlerRefCon)
  234. ;
  235.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  236.         Macro
  237.         _InstallReceiveHandler
  238.             moveq               #2,D0
  239.             dc.w                $ABED
  240.         EndM
  241.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  242.         IMPORT_CFM_FUNCTION InstallReceiveHandler
  243.     ENDIF
  244.  
  245. ;
  246. ; pascal OSErr RemoveTrackingHandler(DragTrackingHandlerUPP trackingHandler, WindowPtr theWindow)
  247. ;
  248.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  249.         Macro
  250.         _RemoveTrackingHandler
  251.             moveq               #3,D0
  252.             dc.w                $ABED
  253.         EndM
  254.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  255.         IMPORT_CFM_FUNCTION RemoveTrackingHandler
  256.     ENDIF
  257.  
  258. ;
  259. ; pascal OSErr RemoveReceiveHandler(DragReceiveHandlerUPP receiveHandler, WindowPtr theWindow)
  260. ;
  261.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  262.         Macro
  263.         _RemoveReceiveHandler
  264.             moveq               #4,D0
  265.             dc.w                $ABED
  266.         EndM
  267.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  268.         IMPORT_CFM_FUNCTION RemoveReceiveHandler
  269.     ENDIF
  270.  
  271.  
  272. ;  _________________________________________________________________________________________________________
  273. ;      
  274. ;   • CREATING & DISPOSING
  275. ;  _________________________________________________________________________________________________________
  276.  
  277.  
  278.  
  279. ;
  280. ; pascal OSErr NewDrag(DragReference *theDrag)
  281. ;
  282.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  283.         Macro
  284.         _NewDrag
  285.             moveq               #5,D0
  286.             dc.w                $ABED
  287.         EndM
  288.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  289.         IMPORT_CFM_FUNCTION NewDrag
  290.     ENDIF
  291.  
  292. ;
  293. ; pascal OSErr DisposeDrag(DragReference theDrag)
  294. ;
  295.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  296.         Macro
  297.         _DisposeDrag
  298.             moveq               #6,D0
  299.             dc.w                $ABED
  300.         EndM
  301.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  302.         IMPORT_CFM_FUNCTION DisposeDrag
  303.     ENDIF
  304.  
  305.  
  306. ;  _________________________________________________________________________________________________________
  307. ;      
  308. ;   • ADDING DRAG ITEM FLAVORS
  309. ;  _________________________________________________________________________________________________________
  310.  
  311.  
  312.  
  313. ;
  314. ; pascal OSErr AddDragItemFlavor(DragReference theDrag, ItemReference theItemRef, FlavorType theType, const void *dataPtr, Size dataSize, FlavorFlags theFlags)
  315. ;
  316.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  317.         Macro
  318.         _AddDragItemFlavor
  319.             moveq               #7,D0
  320.             dc.w                $ABED
  321.         EndM
  322.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  323.         IMPORT_CFM_FUNCTION AddDragItemFlavor
  324.     ENDIF
  325.  
  326. ;
  327. ; pascal OSErr SetDragItemFlavorData(DragReference theDrag, ItemReference theItemRef, FlavorType theType, const void *dataPtr, Size dataSize, UInt32 dataOffset)
  328. ;
  329.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  330.         Macro
  331.         _SetDragItemFlavorData
  332.             moveq               #9,D0
  333.             dc.w                $ABED
  334.         EndM
  335.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  336.         IMPORT_CFM_FUNCTION SetDragItemFlavorData
  337.     ENDIF
  338.  
  339.  
  340. ;  _________________________________________________________________________________________________________
  341. ;      
  342. ;   • PROVIDING CALLBACK PROCEDURES
  343. ;  _________________________________________________________________________________________________________
  344.  
  345.  
  346.  
  347. ;
  348. ; pascal OSErr SetDragSendProc(DragReference theDrag, DragSendDataUPP sendProc, void *dragSendRefCon)
  349. ;
  350.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  351.         Macro
  352.         _SetDragSendProc
  353.             moveq               #10,D0
  354.             dc.w                $ABED
  355.         EndM
  356.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  357.         IMPORT_CFM_FUNCTION SetDragSendProc
  358.     ENDIF
  359.  
  360.  
  361. ;
  362. ; pascal OSErr SetDragInputProc(DragReference theDrag, DragInputUPP inputProc, void *dragInputRefCon)
  363. ;
  364.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  365.         Macro
  366.         _SetDragInputProc
  367.             moveq               #11,D0
  368.             dc.w                $ABED
  369.         EndM
  370.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  371.         IMPORT_CFM_FUNCTION SetDragInputProc
  372.     ENDIF
  373.  
  374. ;
  375. ; pascal OSErr SetDragDrawingProc(DragReference theDrag, DragDrawingUPP drawingProc, void *dragDrawingRefCon)
  376. ;
  377.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  378.         Macro
  379.         _SetDragDrawingProc
  380.             moveq               #12,D0
  381.             dc.w                $ABED
  382.         EndM
  383.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  384.         IMPORT_CFM_FUNCTION SetDragDrawingProc
  385.     ENDIF
  386.  
  387.  
  388. ;  _________________________________________________________________________________________________________
  389. ;      
  390. ;   • SETTING THE DRAG IMAGE
  391. ;  _________________________________________________________________________________________________________
  392.  
  393.  
  394.  
  395. ;
  396. ; pascal OSErr SetDragImage(DragReference theDrag, PixMapHandle imagePixMap, RgnHandle imageRgn, Point imageOffsetPt, DragImageFlags theImageFlags)
  397. ;
  398.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  399.         Macro
  400.         _SetDragImage
  401.             moveq               #39,D0
  402.             dc.w                $ABED
  403.         EndM
  404.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  405.         IMPORT_CFM_FUNCTION SetDragImage
  406.     ENDIF
  407.  
  408.  
  409. ;  _________________________________________________________________________________________________________
  410. ;      
  411. ;   • PERFORMING A DRAG
  412. ;  _________________________________________________________________________________________________________
  413.  
  414.  
  415.  
  416. ;
  417. ; pascal OSErr TrackDrag(DragReference theDrag, const EventRecord *theEvent, RgnHandle theRegion)
  418. ;
  419.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  420.         Macro
  421.         _TrackDrag
  422.             moveq               #13,D0
  423.             dc.w                $ABED
  424.         EndM
  425.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  426.         IMPORT_CFM_FUNCTION TrackDrag
  427.     ENDIF
  428.  
  429.  
  430. ;  _________________________________________________________________________________________________________
  431. ;      
  432. ;   • GETTING DRAG ITEM INFORMATION
  433. ;  _________________________________________________________________________________________________________
  434.  
  435.  
  436.  
  437. ;
  438. ; pascal OSErr CountDragItems(DragReference theDrag, UInt16 *numItems)
  439. ;
  440.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  441.         Macro
  442.         _CountDragItems
  443.             moveq               #14,D0
  444.             dc.w                $ABED
  445.         EndM
  446.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  447.         IMPORT_CFM_FUNCTION CountDragItems
  448.     ENDIF
  449.  
  450. ;
  451. ; pascal OSErr GetDragItemReferenceNumber(DragReference theDrag, UInt16 index, ItemReference *theItemRef)
  452. ;
  453.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  454.         Macro
  455.         _GetDragItemReferenceNumber
  456.             moveq               #15,D0
  457.             dc.w                $ABED
  458.         EndM
  459.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  460.         IMPORT_CFM_FUNCTION GetDragItemReferenceNumber
  461.     ENDIF
  462.  
  463. ;
  464. ; pascal OSErr CountDragItemFlavors(DragReference theDrag, ItemReference theItemRef, UInt16 *numFlavors)
  465. ;
  466.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  467.         Macro
  468.         _CountDragItemFlavors
  469.             moveq               #16,D0
  470.             dc.w                $ABED
  471.         EndM
  472.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  473.         IMPORT_CFM_FUNCTION CountDragItemFlavors
  474.     ENDIF
  475.  
  476. ;
  477. ; pascal OSErr GetFlavorType(DragReference theDrag, ItemReference theItemRef, UInt16 index, FlavorType *theType)
  478. ;
  479.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  480.         Macro
  481.         _GetFlavorType
  482.             moveq               #17,D0
  483.             dc.w                $ABED
  484.         EndM
  485.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  486.         IMPORT_CFM_FUNCTION GetFlavorType
  487.     ENDIF
  488.  
  489. ;
  490. ; pascal OSErr GetFlavorFlags(DragReference theDrag, ItemReference theItemRef, FlavorType theType, FlavorFlags *theFlags)
  491. ;
  492.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  493.         Macro
  494.         _GetFlavorFlags
  495.             moveq               #18,D0
  496.             dc.w                $ABED
  497.         EndM
  498.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  499.         IMPORT_CFM_FUNCTION GetFlavorFlags
  500.     ENDIF
  501.  
  502. ;
  503. ; pascal OSErr GetFlavorDataSize(DragReference theDrag, ItemReference theItemRef, FlavorType theType, Size *dataSize)
  504. ;
  505.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  506.         Macro
  507.         _GetFlavorDataSize
  508.             moveq               #19,D0
  509.             dc.w                $ABED
  510.         EndM
  511.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  512.         IMPORT_CFM_FUNCTION GetFlavorDataSize
  513.     ENDIF
  514.  
  515. ;
  516. ; pascal OSErr GetFlavorData(DragReference theDrag, ItemReference theItemRef, FlavorType theType, void *dataPtr, Size *dataSize, UInt32 dataOffset)
  517. ;
  518.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  519.         Macro
  520.         _GetFlavorData
  521.             moveq               #20,D0
  522.             dc.w                $ABED
  523.         EndM
  524.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  525.         IMPORT_CFM_FUNCTION GetFlavorData
  526.     ENDIF
  527.  
  528.  
  529. ;  _________________________________________________________________________________________________________
  530. ;      
  531. ;   • DRAG ITEM BOUNDS
  532. ;  _________________________________________________________________________________________________________
  533.  
  534.  
  535.  
  536. ;
  537. ; pascal OSErr GetDragItemBounds(DragReference theDrag, ItemReference theItemRef, Rect *itemBounds)
  538. ;
  539.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  540.         Macro
  541.         _GetDragItemBounds
  542.             moveq               #21,D0
  543.             dc.w                $ABED
  544.         EndM
  545.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  546.         IMPORT_CFM_FUNCTION GetDragItemBounds
  547.     ENDIF
  548.  
  549. ;
  550. ; pascal OSErr SetDragItemBounds(DragReference theDrag, ItemReference theItemRef, const Rect *itemBounds)
  551. ;
  552.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  553.         Macro
  554.         _SetDragItemBounds
  555.             moveq               #22,D0
  556.             dc.w                $ABED
  557.         EndM
  558.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  559.         IMPORT_CFM_FUNCTION SetDragItemBounds
  560.     ENDIF
  561.  
  562.  
  563. ;  _________________________________________________________________________________________________________
  564. ;      
  565. ;   • DROP LOCATIONS
  566. ;  _________________________________________________________________________________________________________
  567.  
  568.  
  569.  
  570. ;
  571. ; pascal OSErr GetDropLocation(DragReference theDrag, AEDesc *dropLocation)
  572. ;
  573.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  574.         Macro
  575.         _GetDropLocation
  576.             moveq               #23,D0
  577.             dc.w                $ABED
  578.         EndM
  579.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  580.         IMPORT_CFM_FUNCTION GetDropLocation
  581.     ENDIF
  582.  
  583. ;
  584. ; pascal OSErr SetDropLocation(DragReference theDrag, const AEDesc *dropLocation)
  585. ;
  586.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  587.         Macro
  588.         _SetDropLocation
  589.             moveq               #24,D0
  590.             dc.w                $ABED
  591.         EndM
  592.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  593.         IMPORT_CFM_FUNCTION SetDropLocation
  594.     ENDIF
  595.  
  596.  
  597. ;  _________________________________________________________________________________________________________
  598. ;      
  599. ;   • GETTING INFORMATION ABOUT A DRAG
  600. ;  _________________________________________________________________________________________________________
  601.  
  602.  
  603.  
  604. ;
  605. ; pascal OSErr GetDragAttributes(DragReference theDrag, DragAttributes *flags)
  606. ;
  607.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  608.         Macro
  609.         _GetDragAttributes
  610.             moveq               #25,D0
  611.             dc.w                $ABED
  612.         EndM
  613.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  614.         IMPORT_CFM_FUNCTION GetDragAttributes
  615.     ENDIF
  616.  
  617. ;
  618. ; pascal OSErr GetDragMouse(DragReference theDrag, Point *mouse, Point *globalPinnedMouse)
  619. ;
  620.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  621.         Macro
  622.         _GetDragMouse
  623.             moveq               #26,D0
  624.             dc.w                $ABED
  625.         EndM
  626.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  627.         IMPORT_CFM_FUNCTION GetDragMouse
  628.     ENDIF
  629.  
  630. ;
  631. ; pascal OSErr SetDragMouse(DragReference theDrag, Point globalPinnedMouse)
  632. ;
  633.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  634.         Macro
  635.         _SetDragMouse
  636.             moveq               #27,D0
  637.             dc.w                $ABED
  638.         EndM
  639.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  640.         IMPORT_CFM_FUNCTION SetDragMouse
  641.     ENDIF
  642.  
  643. ;
  644. ; pascal OSErr GetDragOrigin(DragReference theDrag, Point *globalInitialMouse)
  645. ;
  646.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  647.         Macro
  648.         _GetDragOrigin
  649.             moveq               #28,D0
  650.             dc.w                $ABED
  651.         EndM
  652.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  653.         IMPORT_CFM_FUNCTION GetDragOrigin
  654.     ENDIF
  655.  
  656. ;
  657. ; pascal OSErr GetDragModifiers(DragReference theDrag, SInt16 *modifiers, SInt16 *mouseDownModifiers, SInt16 *mouseUpModifiers)
  658. ;
  659.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  660.         Macro
  661.         _GetDragModifiers
  662.             moveq               #29,D0
  663.             dc.w                $ABED
  664.         EndM
  665.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  666.         IMPORT_CFM_FUNCTION GetDragModifiers
  667.     ENDIF
  668.  
  669.  
  670. ;  _________________________________________________________________________________________________________
  671. ;      
  672. ;   • DRAG HIGHLIGHTING
  673. ;  _________________________________________________________________________________________________________
  674.  
  675.  
  676.  
  677. ;
  678. ; pascal OSErr ShowDragHilite(DragReference theDrag, RgnHandle hiliteFrame, Boolean inside)
  679. ;
  680.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  681.         Macro
  682.         _ShowDragHilite
  683.             moveq               #30,D0
  684.             dc.w                $ABED
  685.         EndM
  686.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  687.         IMPORT_CFM_FUNCTION ShowDragHilite
  688.     ENDIF
  689.  
  690. ;
  691. ; pascal OSErr HideDragHilite(DragReference theDrag)
  692. ;
  693.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  694.         Macro
  695.         _HideDragHilite
  696.             moveq               #31,D0
  697.             dc.w                $ABED
  698.         EndM
  699.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  700.         IMPORT_CFM_FUNCTION HideDragHilite
  701.     ENDIF
  702.  
  703. ;
  704. ; pascal OSErr DragPreScroll(DragReference theDrag, SInt16 dH, SInt16 dV)
  705. ;
  706.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  707.         Macro
  708.         _DragPreScroll
  709.             moveq               #32,D0
  710.             dc.w                $ABED
  711.         EndM
  712.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  713.         IMPORT_CFM_FUNCTION DragPreScroll
  714.     ENDIF
  715.  
  716. ;
  717. ; pascal OSErr DragPostScroll(DragReference theDrag)
  718. ;
  719.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  720.         Macro
  721.         _DragPostScroll
  722.             moveq               #33,D0
  723.             dc.w                $ABED
  724.         EndM
  725.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  726.         IMPORT_CFM_FUNCTION DragPostScroll
  727.     ENDIF
  728.  
  729. ;
  730. ; pascal OSErr UpdateDragHilite(DragReference theDrag, RgnHandle updateRgn)
  731. ;
  732.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  733.         Macro
  734.         _UpdateDragHilite
  735.             moveq               #34,D0
  736.             dc.w                $ABED
  737.         EndM
  738.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  739.         IMPORT_CFM_FUNCTION UpdateDragHilite
  740.     ENDIF
  741.  
  742. ;
  743. ; pascal OSErr GetDragHiliteColor(WindowPtr window, RGBColor *color)
  744. ;
  745.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  746.         Macro
  747.         _GetDragHiliteColor
  748.             moveq               #38,D0
  749.             dc.w                $ABED
  750.         EndM
  751.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  752.         IMPORT_CFM_FUNCTION GetDragHiliteColor
  753.     ENDIF
  754.  
  755.  
  756.  
  757. ;  _________________________________________________________________________________________________________
  758. ;      
  759. ;   • UTILITIES
  760. ;  _________________________________________________________________________________________________________
  761.  
  762.  
  763.  
  764.  
  765. ;
  766. ; pascal Boolean WaitMouseMoved(Point initialMouse)
  767. ;
  768.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  769.         Macro
  770.         _WaitMouseMoved
  771.             moveq               #35,D0
  772.             dc.w                $ABED
  773.         EndM
  774.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  775.         IMPORT_CFM_FUNCTION WaitMouseMoved
  776.     ENDIF
  777.  
  778.  
  779. ;
  780. ; pascal OSErr ZoomRects(const Rect *fromRect, const Rect *toRect, SInt16 zoomSteps, ZoomAcceleration acceleration)
  781. ;
  782.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  783.         Macro
  784.         _ZoomRects
  785.             moveq               #36,D0
  786.             dc.w                $ABED
  787.         EndM
  788.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  789.         IMPORT_CFM_FUNCTION ZoomRects
  790.     ENDIF
  791.  
  792. ;
  793. ; pascal OSErr ZoomRegion(RgnHandle region, Point zoomDistance, SInt16 zoomSteps, ZoomAcceleration acceleration)
  794. ;
  795.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  796.         Macro
  797.         _ZoomRegion
  798.             moveq               #37,D0
  799.             dc.w                $ABED
  800.         EndM
  801.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  802.         IMPORT_CFM_FUNCTION ZoomRegion
  803.     ENDIF
  804.  
  805.  
  806.  
  807. ;  _________________________________________________________________________________________________________
  808. ;   • OLD NAMES
  809. ;     These are provided for compatiblity with older source bases.  It is recommended to not use them since
  810. ;       they may removed from this interface file at any time.
  811. ;  _________________________________________________________________________________________________________
  812.  
  813.  
  814.  
  815.     IF OLDROUTINENAMES THEN
  816.  
  817. dragHasLeftSenderWindow            EQU        $00000001            ; drag has left the source window since TrackDrag 
  818. dragInsideSenderApplication        EQU        $00000002            ; drag is occurring within the sender application 
  819. dragInsideSenderWindow            EQU        $00000004            ; drag is occurring within the sender window 
  820.  
  821. dragTrackingEnterHandler        EQU        1                    ; drag has entered handler 
  822. dragTrackingEnterWindow            EQU        2                    ; drag has entered window 
  823. dragTrackingInWindow            EQU        3                    ; drag is moving within window 
  824. dragTrackingLeaveWindow            EQU        4                    ; drag has exited window 
  825. dragTrackingLeaveHandler        EQU        5                    ; drag has exited handler 
  826.  
  827. dragRegionBegin                    EQU        1                    ; initialize drawing 
  828. dragRegionDraw                    EQU        2                    ; draw drag feedback 
  829. dragRegionHide                    EQU        3                    ; hide drag feedback 
  830. dragRegionIdle                    EQU        4                    ; drag feedback idle time 
  831. dragRegionEnd                    EQU        5                    ; end of drawing 
  832.  
  833. zoomNoAcceleration                EQU        0                    ; use linear interpolation 
  834. zoomAccelerate                    EQU        1                    ; ramp up step size 
  835. zoomDecelerate                    EQU        2                    ; ramp down step size 
  836.  
  837. kDragStandardImage                EQU        0                    ; 65% image translucency (standard)
  838. kDragDarkImage                    EQU        1                    ; 50% image translucency
  839. kDragDarkerImage                EQU        2                    ; 25% image translucency
  840. kDragOpaqueImage                EQU        3                    ; 0% image translucency (opaque)
  841.     ENDIF    ; OLDROUTINENAMES
  842.     ENDIF ; __DRAG__ 
  843.  
  844.